var Admin = require('../controller/admin/admin')

module.exports = function (app) {
  app.get('/login', Admin.login)

  app.get('/register', Admin.register)
  app.get('/admin', Admin.admin)

  app.post('/admin/add_products', Admin.add_products)
  app.post('/admin/get_products', Admin.get_products)
  app.post('/admin/products_content', Admin.get_products_detail)
  app.post('/admin/edit_products', Admin.edit_products)
  app.post('/admin/products_del', Admin.del_one)
  app.post('/admin/remove_products', Admin.remove_products)
  app.post('/admin/deal_product', Admin.deal_product)

  app.post('/admin/post_user', Admin.add_admin)
  app.post('/admin/get_users', Admin.get_users)
  app.post('/admin/user_del', Admin.user_del)

  app.post('/login', Admin.checkUser)
  app.post('/register', Admin.post_register)
  app.get('/logout', Admin.logout)
  app.post('/authorize', Admin.authorize)

  app.post('/admin/get_feedbacks', Admin.get_feedbacks)
  app.post('/admin/deal_feedbacks', Admin.deal_feedbacks)

  app.get('/admin/check_feedbacks', Admin.check_feedbacks)
}
